FROM python:3.6
WORKDIR /home/mysite


COPY . .
RUN pip install -r requirements.txt -i http://mirrors.aliyun.com/pypi/simple/ --timeout=100 --trusted-host mirrors.aliyun.com && pip install --no-cache-dir uwsgi -i http://mirrors.aliyun.com/pypi/simple/ --timeout=100 --trusted-host mirrors.aliyun.com
RUN chmod +x start.sh
RUN apt-get -q update && apt-get -qy install netcat
RUN chmod +x wait-for.sh

EXPOSE 8000 8000
ENTRYPOINT ["./start.sh"]
